package com.cwf.basic.listener;

import com.cwf.auth.service.IPermissionScanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.ContextLoaderListener;

import javax.servlet.ServletContextEvent;
import javax.servlet.annotation.WebListener;

@WebListener
public class InitDataListener extends ContextLoaderListener {
    @Autowired
    private IPermissionScanService permissionScanService;
    @Override
    public void contextInitialized(ServletContextEvent event) {
        System.out.println("初始化开始...");
        permissionScanService.scan();
        System.out.println("初始化结束...");
    }
}
